<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ez="http://java.sun.com/jsf/composite/ezcomp"
                xmlns:pe="http://primefaces.org/ui/extensions">


    <ui:define name="content">
        <h:form>

            <p:panel id="reportPrint"  >

                <f:facet name="header" >
                    <h:outputLabel value="Day-end Detailed Report -  Bills -&nbsp;&nbsp; #{sessionController.institution.name}"/>
                    <p:commandButton ajax="false" value="Refresh" styleClass="noPrintButton" style="float: right;"/>  
                    <p:commandButton ajax="false" value="Print" styleClass="noPrintButton" style="float: right;">
                        <p:printer target="reportPrint" />
                    </p:commandButton>  
                    
                    <p:commandButton value="Excel" ajax="false" styleClass="noPrintButton" style="float: right;"
                                    action="report_opd_cashier_session_detailed_report_institution_own_print">
                       
                    </p:commandButton>
                </f:facet>

                <p:panelGrid columns="5" styleClass="noPrintButton"  >

                    <h:outputLabel value="From Date"/>
                    <p:calendar id="frmDate" value="#{commonReport.fromDate}" navigator="true"  pattern="dd MMMM yyyy HH:mm:ss" >
                    </p:calendar>

                    <h:outputLabel value="To Date"/>
                    <p:calendar id="toDate" value="#{commonReport.toDate}" navigator="true" pattern="dd MMMM yyyy HH:mm:ss" >
                    </p:calendar>

                </p:panelGrid>
                <p:panelGrid columns="4" styleClass="printBlock" style="min-width: 100%;">
                    <h:outputLabel value="From" />
                    <h:outputLabel  value="#{commonReport.fromDate}" >
                        <f:convertDateTime pattern="dd MM yy hh:mm a"/>
                    </h:outputLabel>
                    <h:outputLabel value="To"/>
                    <h:outputLabel  value="#{commonReport.toDate}" style="float: right" >
                        <f:convertDateTime pattern="dd MM yy hh:mm a"/>
                    </h:outputLabel>
                </p:panelGrid>


                <p:panel id="data">
                    <ez:tableBilledBill   bill="#{commonReport.institutionBilledBillsOwn}"/>

                    <ez:tableCancelledBill bill="#{commonReport.institutionCancelledBillsOwn}" />

                    <ez:tableRefundBill bill="#{commonReport.institutionRefundedBillsOwn}" />

                    <ez:tablePaymentBill bill="#{commonReport.institutionPaymentBillsOwn}"/>

                    <ez:tablePaymentCancel bill="#{commonReport.institutionPaymentCancelBillsOwn}" />

                    <ez:tablePettyPayment bill="#{commonReport.institutionPettyPaymentBillsOwn}" />

                    <ez:tablePettyCancel bill="#{commonReport.institutionPettyCancellBillsOwn}" />

                    <ez:tableCompanyPayment bill="#{commonReport.institutionCashRecieveBillsOwn}" />

                    <ez:tableCompanyCancel bill="#{commonReport.institutionCashRecieveCancellBillsOwn}" />

                    <ez:tableAgentPayment bill="#{commonReport.institutionAgentBillsOwn}"  />

                    <ez:tableAgentCancel bill="#{commonReport.institutionAgentCancellBillsOwn}"/>

                    <ez:tableInwardPaymentBill bill="#{commonReport.institutionInwardPaymentBillsOwn}"/>

                    <ez:tableInwardPaymentCancel  bill="#{commonReport.institutionInwardPaymentCancelBillsOwn}" />

                    <br></br><br></br><br></br>
                    <p:panelGrid columns="2" style="min-width: 100%;">

                        <h:outputLabel value="Final Credit Total : "/>
                        <h:outputLabel style="font-weight: bold;float: right;" value="#{commonReport.finalCreditTotal}"><f:convertNumber pattern="#,##0.00" /></h:outputLabel>
                        <h:outputLabel value="Final Credit Card Total : "/>
                        <h:outputLabel style="font-weight: bold;float: right;" value="#{commonReport.finalCreditCardTotal}"><f:convertNumber pattern="#,##0.00" /></h:outputLabel>
                        <h:outputLabel value="Final Cheque Total : "/>
                        <h:outputLabel style="font-weight: bold;float: right;" value="#{commonReport.finalChequeTot}"><f:convertNumber pattern="#,##0.00" /></h:outputLabel>
                        <h:outputLabel value="Final Slip Total : "/>
                        <h:outputLabel  value="#{commonReport.finalSlipTot}" style="float: right;font-weight: bold;text-align: right;font-size: 12px;"  ><f:convertNumber pattern="#,##0.00" /></h:outputLabel>
                        <h:outputLabel value="Final Cash Total : "/>
                        <h:outputLabel style="font-weight: bold;float: right;" value="#{commonReport.finalCashTotal}"><f:convertNumber pattern="#,##0.00" /></h:outputLabel>

                    </p:panelGrid>
                </p:panel>

            </p:panel>



        </h:form>
    </ui:define>

</ui:composition>
